package com.qf.lanzhou.blog.api.pojo.vo;

import com.qf.lanzhou.blog.api.pojo.entity.Comment;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;

/**
 * @author 是柠檬甜
 * @ClassName CommentVo
 * @description 评论对象扩展实体类
 * @date 2020/12/17 16:54
 * @modifier 是柠檬甜
 * @date 2020-12-17 16:54
 * @Version V1.0
 */
public class CommentVo extends Comment {
    private String articleName;
    private Long commentId;
    private String commentContent;
    private Timestamp commentTime;
    private String userName;
    private Long articleId;
    private String commentTimeStr;
    private static SimpleDateFormat sdf;
    private String commentStatus;

    @Override
    public String getCommentStatus() {
        return commentStatus;
    }

    @Override
    public void setCommentStatus(String commentStatus) {
        this.commentStatus = commentStatus;
    }
    @Override
    public String toString() {
        return "CommentVo{" +
                "articleName='" + articleName + '\'' +
                ", commentId=" + commentId +
                ", commentContent='" + commentContent + '\'' +
                ", commentTime=" + commentTime +
                ", userName='" + userName + '\'' +
                ", articleId=" + articleId +
                ", commentTimeStr='" + commentTimeStr + '\'' +
                '}';
    }

    @Override
    public Long getCommentId() {
        return commentId;
    }
    @Override
    public void setCommentId(Long commentId) {
        this.commentId = commentId;
    }
    @Override
    public String getCommentContent() {
        return commentContent;
    }
    @Override
    public void setCommentContent(String commentContent) {
        this.commentContent = commentContent;
    }
    @Override
    public Timestamp getCommentTime() {
        return commentTime;
    }
    @Override
    public void setCommentTime(Timestamp commentTime) {
        this.commentTime = commentTime;
    }
    @Override
    public String getUserName() {
        return userName;
    }
    @Override
    public void setUserName(String userName) {
        this.userName = userName;
    }
    @Override
    public Long getArticleId() {
        return articleId;
    }
    @Override
    public void setArticleId(Long articleId) {
        this.articleId = articleId;
    }
    @Override
    public String getCommentTimeStr() {
        return commentTimeStr;
    }
    @Override
    public void setCommentTimeStr(Timestamp commentTime) {
        sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String notificationTimeStr = sdf.format(commentTime);
        this.commentTimeStr = notificationTimeStr;
    }

    public String getArticleName() {
        return articleName;
    }

    public void setArticleName(String articleName) {
        this.articleName = articleName;
    }

}
